package com.itheima.tlias84.controller;

import com.itheima.tlias84.po.LoginParam;
import com.itheima.tlias84.po.PageParam;
import com.itheima.tlias84.service.impl.EmpServiceImpl;
import com.itheima.tlias84.service.impl.LoginServiceImpl;
import com.itheima.tlias84.utils.ResultUtil;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.Objects;


@RestController
@RequestMapping
public class LoginController {
    @Resource
    LoginServiceImpl loginService;

    @PostMapping("login")
    public ResultUtil login(@Validated @RequestBody LoginParam param) {
       return loginService.login(param);
    }

    @GetMapping("/log/page")
    public ResultUtil selectLog(PageParam param){
       return loginService.selectLog(param);
    }

}
